<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:if test="${sessionScope.mvo==null }">
<jsp:forward page="../index.jsp"></jsp:forward>
</c:if>
<div id="main_write">
<form action="gallery.do" method="post" id="writeForm" enctype="multipart/form-data">
<input type="hidden" name="mode" value="write">
<table>
<tr>
	<td>사진</td>
	<td>
		<input type="file" name="uploadImg" id="main_uploadImg"><br>
		3MB 이하로 업로드해주세요
	</td>
</tr>
<tr>
	<td>제목</td>
	<td><input type="text" name="title" id="main_title" size="60"></td>
</tr>
<tr>
	<td>내용</td>
	<td><textarea name="contents" id="main_content" cols="60" rows="5"></textarea></td>
</tr>
<tr>
<td>Category</td>
	<td>
		<select name="category" id="category">
			<option value="">------</option>
			<option value="paractice">습작</option>
			<option value="series">연작</option>
			<option value="art">작품</option>
		</select>
	</td>
</tr>
<tr align="right">
	<td colspan="2"><input type="button" id="writeBtn" value="확인"></td>
</tr>
</table>
<input type="hidden" name="wow" value="0">
</form>
</div>
<div id="friendList">
	<table>
		<tr>
			<td><img src="profileImg/${sessionScope.mvo.proImg }"></td>
			<td>
			<table>
				<tr><td><b>${sessionScope.mvo.id }</b></td></tr>
				<tr><td>nickname : ${sessionScope.mvo.nickname }</td></tr>
				<tr><td>level : ${sessionScope.mvo.level }</td></tr>
			</table>
			</td>
		</tr>
	</table>
</div>
<div id="myGallery">
gallery
</div>
<script type="text/javascript">
$("#writeBtn").click(function(){
	if($("#main_uploadImg").val()==""){
		alert("사진을 올려주세요!");
		return;
	}
	if($("#category").val()==""){
		alert("카테고리를 선택해주세요");
		return;
	};
	$("#writeForm").submit();
});
</script>